<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <title>cardset</title>
  <link rel="stylesheet" href="../static/framework/font-awesome/css/font-awesome.min.css">
  <link rel="stylesheet" href="../static/framework/reset.css">
  <link rel="stylesheet" href="../static/css/footer.css">
  <link rel="stylesheet" href="../static/css/editRecipient.css">
  <link href="../static/layui-v2.9.1/layui/css/layui.css" rel="stylesheet">
  <script src="../static/layui-v2.9.1/layui/layui.js"></script>
  <link rel="stylesheet" href="../static/bootstrap-5.3.0-dist/css/bootstrap.min.css">
  <script src="../static/bootstrap-5.3.0-dist/js/bootstrap.bundle.min.js"></script>
  <link rel="stylesheet" href="../static/css/recipientList.css">
  <style>
    #myForm {

      max-width: 400px;
      margin: auto;
    }

    #myForm h2 {
      text-align: center;
      margin-bottom: 20px;
    }

    #myForm form {
      display: flex;
      flex-direction: column;
      gap: 15px;
    }

    #myForm input[type="text"],
    #myForm input[type="email"] {
      padding: 10px;
      font-size: 16px;
      border: 1px solid #ccc;
      border-radius: 5px;
    }

    #myForm button[type="submit"] {
      padding: 10px;
      font-size: 16px;
      color: #fff;
      background-color: #007bff;
      border: none;
      border-radius: 5px;
      cursor: pointer;
    }
  </style>
</head>

<body>
  <div class="wrapper" style="padding: 20px;">
    <header>
      <i class="fa fa-angle-left fa-2x" onclick="location.href='/card'" style="font-size: 20px">首页</i>
      <p style="margin: auto;">银行卡挂失</p>
      <p></p>
    </header>
    <br><br>
    <div id="myForm">
      <form action="/card/delectcard" method="put">
        <div th:text="'账户：' + ${session.cardId}">账户</div>
        <input type="hidden" id="cardId" name="cardId" th:value="${session.cardId}">
        <input type="hidden" id="statusId" name="statusId" value="2">
        <input type="password" name="password" placeholder="账户密码" style="height: 45px">
        <div style="color: red" th:text="${session.msg}"></div>
        <button type="submit">挂失</button>
      </form>
    </div>

    <footer class="footer">
      <div>
        <button type="button" class="layui-btn">
          <i class="layui-icon layui-icon-left"></i>
        </button>
        <button type="button" class="layui-btn">
          <i class="layui-icon layui-icon-right"></i>
        </button>
      </div>
    </footer>
  </div>
  <script>
    const back = document.querySelector('button:first-child')
    const forword = back.nextElementSibling
    back.addEventListener('click', function () {
      //history.back()
      history.go(-1)
    })

    forword.addEventListener('click', function () {
      //history.forward()
      history.go(1)
    })

  </script>
</body>

</html>